package lcr;

public class Test0032 {
}

class Solution0032_1 {
    public boolean isAnagram(String s, String t) {
        int[] records = new int[26];
        for (char c : s.toCharArray())
            records[c - 'a']++;
        for (char c : t.toCharArray())
            if (--records[c - 'a']<0) return false;
        for (int record : records)
            if (record != 0) return false;
        return true;
    }
}
